import request from '@/utils/request'

export default {
    /**
     * 条件查询分页课程数据
     * @param {当前页} current 
     * @param {每页记录数} size 
     * @param {条件查询对象} courseFrontVo 
     * @returns 
     */
    getCourseFrontList(current, size, courseFrontVo) {
        return request({
            url: `/eduservice/coursefront/getFrontCourseList/${current}/${size}`,
            method: 'post',
            data: courseFrontVo
        })
    },
    /**
     * 课程分类列表
     * @returns 
     */
    getSubjectList() {
        return request({
            url: '/eduservice/subject/getAllSubject',
            method: 'get'
          })
    },
    /**
     * 获取课程详情数据
     * @param {课程id} courseId 
     * @returns 
     */
    getFrontCourseDetail(courseId) {
        return request({
            url: `/eduservice/coursefront/getFrontCourse/${courseId}`,
            method: 'get'
        })
    }
}